﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WCS.Infrastructure.Dto.Common;

namespace WCS.Infrastructure.Dto.Request.Payment
{
    /// <summary>
    /// 支付码表
    /// </summary>
    public class PaymentCodeRequestDto:BaseRequestDto
    {
        /// <summary>
        /// 支付码ID
        /// </summary>
        [Key]
        [StringLength(32)]
        public string? Id { get; set; } = null!;

        /// <summary>
        /// 支付码编号
        /// </summary>
        [StringLength(32)]
        public string? Code { get; set; } = null!;

        /// <summary>
        /// 支付码名称
        /// </summary>
        [StringLength(255)]
        public string? CodeName { get; set; } = null!;

        /// <summary>
        /// 商户ID
        /// </summary>
        [StringLength(32)]
        public string? MerchantId { get; set; } = null!;

        /// <summary>
        /// 门店ID
        /// </summary>
        [StringLength(32)]
        public string? StoreId { get; set; }

        /// <summary>
        /// 分账协议ID
        /// </summary>
        [StringLength(32)]
        public string? DividedAgreementId { get; set; }

        /// <summary>
        /// 父级支付码ID
        /// </summary>
        [StringLength(32)]
        public string? ParentId { get; set; }

        /// <summary>
        /// 支付设备ID
        /// </summary>
        [StringLength(32)]
        public string? DeviceId { get; set; }

        /// <summary>
        /// 结算周期
        /// </summary>
        public int? SettlementCycle { get; set; }

        /// <summary>
        /// 级联ID，用于多级关联
        /// </summary>
        [StringLength(2048)]
        public string? CascadeId { get; set; }

        /// <summary>
        /// 支付码URL
        /// </summary>
        [StringLength(255)]
        public string? CodeUrl { get; set; }

        /// <summary>
        /// 扩展属性
        /// </summary>
        public string? ExtraProperties { get; set; }

        /// <summary>
        /// 并发标记
        /// </summary>
        [StringLength(40)]
        public string? ConcurrencyStamp { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        [Column(TypeName = "timestamp(6) without time zone")]
        public DateTime? CreationTime { get; set; }

        /// <summary>
        /// 创建者ID
        /// </summary>
        [StringLength(32)]
        public string? CreatorId { get; set; }

        /// <summary>
        /// 最后修改时间
        /// </summary>
        [Column(TypeName = "timestamp(6) without time zone")]
        public DateTime? LastModificationTime { get; set; }

        /// <summary>
        /// 最后修改者ID
        /// </summary>
        [StringLength(32)]
        public string? LastModifierId { get; set; }

        /// <summary>
        /// 是否删除
        /// </summary>
        public bool? IsDeleted { get; set; }

        /// <summary>
        /// 删除者ID
        /// </summary>
        [StringLength(32)]
        public string? DeleterId { get; set; }

        /// <summary>
        /// 删除时间
        /// </summary>
        [Column(TypeName = "timestamp(6) without time zone")]
        public DateTime? DeletionTime { get; set; }

        /// <summary>
        /// 启用状态
        /// </summary>
        public int? EnableStatus { get; set; }


        ////////////////////////////////////////////////////////////////////////

        /// <summary>
        /// 门店名称
        /// </summary>
        public string? StoreName { get; set; }

        /// <summary>
        /// 用户角色关联ID（团队成员ID）
        /// </summary>
        public List<string>? BindUserId { get; set; } = new List<string>();

        /// <summary>
        /// 成员昵称
        /// </summary>
        public List<string>? BindUserName { get; set; } = new List<string>();

        /// <summary>
        /// 是否查询无分账协议的收款码（true=查询分账协议为空的，false=查询分账协议不为空的，null=不限制）
        /// </summary>
        public bool? QueryNoDividedAgreement { get; set; }
    }
}
